package com.xiaoxi.chainofreponsibilitymode.support;

import com.xiaoxi.chainofreponsibilitymode.trouble.Trouble;

/**
 * @Author xiaoxi
 * @ProjectName design_mode
 * @PackageName com.xiaoxi.chainofreponsibilitymode.support
 * @ClassName OddSupport
 * @Description TODO
 * @Date 2023/3/23 20:33
 * @Version 1.0
 */
public class OddSupport extends Support {
    public OddSupport(String name) {
        super(name);
    }

    @Override
    protected boolean resolve(Trouble trouble) {
        System.out.println("这里是:" + name);
        return trouble.getNum() % 2 != 0;
    }
}
